package com.ruoyi.merchant.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 用户优惠券中间对象 user_coupon
 * 
 * @author ruoyi
 * @date 2025-09-15
 */
public class UserCoupon extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Integer id;

    /** 用户id */
    @Excel(name = "用户id")
    private Integer uId;

    /** 优惠券id */
    @Excel(name = "优惠券id")
    private Integer cId;

    /** 数量，默认是1 */
    @Excel(name = "数量，默认是1")
    private Integer num;

    /** 使用开始时间【领取的时间，优惠券领完可以立即使用，平台特色】 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "使用开始时间【领取的时间，优惠券领完可以立即使用，平台特色】", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expirationStart;

    /** 使用结束时间【一个月】 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "使用结束时间【一个月】", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expirationEnd;

    /** 状态【0未使用、1已使用、2已过期】 */
    @Excel(name = "状态【0未使用、1已使用、2已过期】")
    private Integer status;

    public void setId(Integer id) 
    {
        this.id = id;
    }

    public Integer getId() 
    {
        return id;
    }

    public void setuId(Integer uId) 
    {
        this.uId = uId;
    }

    public Integer getuId() 
    {
        return uId;
    }

    public void setcId(Integer cId) 
    {
        this.cId = cId;
    }

    public Integer getcId() 
    {
        return cId;
    }

    public void setNum(Integer num) 
    {
        this.num = num;
    }

    public Integer getNum() 
    {
        return num;
    }

    public void setExpirationStart(Date expirationStart) 
    {
        this.expirationStart = expirationStart;
    }

    public Date getExpirationStart() 
    {
        return expirationStart;
    }

    public void setExpirationEnd(Date expirationEnd) 
    {
        this.expirationEnd = expirationEnd;
    }

    public Date getExpirationEnd() 
    {
        return expirationEnd;
    }

    public void setStatus(Integer status) 
    {
        this.status = status;
    }

    public Integer getStatus() 
    {
        return status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("uId", getuId())
            .append("cId", getcId())
            .append("num", getNum())
            .append("expirationStart", getExpirationStart())
            .append("expirationEnd", getExpirationEnd())
            .append("status", getStatus())
            .toString();
    }
}
